package com.pinda.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pinda.auth.entity.PdAuthRole;
import io.lettuce.core.dynamic.annotation.Param;

import java.util.List;

/**
 * <p>
 * 角色 Mapper 接口
 * </p>
 *
 * @author 黄杰
 * @since 2023-06-14
 */
public interface PdAuthRoleMapper extends BaseMapper<PdAuthRole> {
    /**
     * TODO 根据角色编号查询所有用户拥有的角色 不查看自己用户
     * @param roleId
     * @param userId
     * @return List<String>
     */
    List<String> findRoleByIdUser(@Param("roleId") String roleId, @Param("userId") String userId);

    /**
     * TODO 新增角色
     * @param pdAuthRole
     * @return boolean
     */
    boolean addRole(PdAuthRole pdAuthRole);
}
